const reg = /^[0-9a-zA-z]{3,6}$/g
let a = "123456"
console.log(reg.test(a));

// 一组数字，千位分隔符分割
const regs = /(\d)(?=(\d{3})+$)/g
let str = "1234567890"
const re = str.replace(regs,"$1,")
console.log(re);